#include "mainwindow.h"
#include "ui_mainwindow.h"
//#include <QUdpSocket>
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    socket = new QUdpSocket(this);

}

MainWindow::~MainWindow()
{
    delete ui;
}


void MainWindow::on_send_but_clicked()
{
   socket->writeDatagram(ui->textEdit->toPlainText().toUtf8(),QHostAddress("127.0.0.1"),8877);
}
